'''
Author: your name
Date: 2020-10-30 13:33:32
LastEditTime: 2020-10-30 13:43:06
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \python-study\爬虫学习\异常捕捉.py
'''
import urllib
import urllib.request

if __name__=="__main__":
    try:
        response = urllib.request.urlopen("1122131")
        print(response)
    except urllib.error.URLError as e:
        print(e.Code)